<div class="top-fixed">
    <div class="navbar" style="max-width: 640px;margin: auto;">
        <div class="navbar-inner">
            <div class="left">
                <a href="javascript:history.back();" class=""><i class="fa fa-angle-left" style="font-size: 30px;"></i></a>
            </div>
            <div class="center">我的订单</div>
            <div class="right">
                <a href="/" class=""><i class="fa fa-home"></i></a>
            </div>
        </div>
    </div>
</div>
<section class="main" style="max-width: 640px;margin: auto;">
    <div id="status-filter" class="table bgf tc fs14 order_nav">
        <a href="/my_orders" data-value="All"
           class="table-cell {{#if_eq query.type 'jd'}}{{^}}active{{/if_eq}}">
            <span class="hint-num">淘宝天猫订单</span>
        </a>
        <a href="/my_orders?type=jd" data-value="Active"
           class="table-cell {{#if_eq query.type 'jd'}}active{{/if_eq}}">
            <span class="hint-num">京东订单</span>
        </a>
    </div>
    <div class="contact_con fs12">
        {{#if rows}}
            <ul class="list-wrapper">
                {{#if_eq query.type 'jd'}}
                    {{#each rows}}
                        {{#if jdOrder}}
                            <li class="bb">
                                {{#each jdOrder.skus}}
                                    <dl class="table ptb10 plr10">
                                        <dd class="table-cell vm">
                                            <p class="col3 single-line"><a
                                                    href="http://item.jd.com/{{skuId}}.html">{{skuName}}</a>
                                            </p>
                                            <p style="color: #FA6E28;">{{../jdOrder.orderStatusName}}</p>
                                        </dd>
                                    </dl>
                                {{/each}}

                                <div class="table">
                                    <dd class="table-cell vm p10">
                                        <p class="col3 single-line">付款金额</p>
                                        <p class="col3">￥{{jdOrder.cosPrice}}</p>
                                    </dd>
                                    <dd class="table-cell vm p10">
                                        <p class="col3 single-line">返现金额</p>
                                        <p class="col3 red">￥{{or jdOrder.pay_amount '0'}}</p>
                                    </dd>
                                    <dd class="table-cell vm p10">
                                        <p class="col3 single-line">返现状态</p>
                                        <p class="col3 red">{{jdOrder.amount_status}}</p>
                                    </dd>
                                </div>

                                <div class="table">
                                    <dd class="table-cell vm p10">
                                        <p class="col6">{{jdOrder.orderId}}</p>
                                    </dd>
                                    <dd class="table-cell vm p10">
                                        <p class="col6">{{format_datetime jdOrder.orderDate}} 创建</p>
                                    </dd>
                                </div>
                            </li>
                        {{^}}
                            <li class="bb">
                                <div style="text-align: center; line-height: 30px; font-size: 16px; padding-top: 15px;">
                                    正在获取订单
                                </div>
                                <div style="color: #FC6D84; text-align: center; line-height: 30px; font-size: 12px;">
                                    数据有几分钟延时，如果数据没有显示，请过几分钟再查询
                                </div>
                                <div class="table">
                                    <dd class="table-cell vm p10">
                                        <p class="col6">{{orderId}}</p>
                                    </dd>
                                    <dd class="table-cell vm p10">
                                        <p class="col6">{{format_datetime orderDate}} 创建</p>
                                    </dd>
                                </div>
                            </li>
                        {{/if}}
                    {{/each}}
                {{^}}
                    {{#each rows}}
                        {{#if taokeOrders}}
                            {{#each taokeOrders}}
                                <li class="bb">
                                    <dl class="table ptb10">
                                        {{#if pictUrl}}
                                            <dt class="table-cell vm w70 plr10">
                                                <div class="br5 item-pic">
                                                    <a href="/detail?id={{auctionId}}"><img
                                                            src="{{pictUrl}}" class="imgm"></a>
                                                </div>
                                            </dt>
                                        {{/if}}
                                        <dd class="table-cell vm">
                                            <p class="col3 single-line"><a
                                                    href="/detail?id={{auctionId}}">{{auctionTitle}}</a>
                                            </p>
                                            <p class="col3">所属店铺：{{exShopTitle}}</p>
                                            <p style="color: #FA6E28;">{{payStatus}}</p>
                                        </dd>
                                    </dl>

                                    <div class="table">
                                        <dd class="table-cell vm p10">
                                            <p class="col3 single-line">付款金额</p>
                                            <p class="col3">￥{{totalAlipayFeeString}}</p>
                                        </dd>
                                        <dd class="table-cell vm p10">
                                            <p class="col3 single-line">返现金额</p>
                                            <p class="col3 red">￥{{or pay_amount '0'}}</p>
                                        </dd>
                                        <dd class="table-cell vm p10">
                                            <p class="col3 single-line">返现状态</p>
                                            <p class="col3 red">{{amount_status}}</p>
                                        </dd>
                                    </div>

                                    <div class="table">
                                        <dd class="table-cell vm p10">
                                            <p class="col6">{{taobaoTradeParentId}}</p>
                                        </dd>
                                        <dd class="table-cell vm p10">
                                            <p class="col6">{{format_datetime createTime}} 创建</p>
                                        </dd>
                                    </div>
                                </li>
                            {{/each}}
                        {{^}}
                            <li class="bb">
                                <div style="text-align: center; line-height: 30px; font-size: 16px; padding-top: 15px;">
                                    {{#time_over created_at 6}}
                                        <div style="color: #FC6D84;">
                                            <img style="vertical-align:middle" src="images/default-fail.png"
                                                 class="w20">
                                            <span style="vertical-align:middle">获取订单失败</span>
                                        </div>
                                        <div style="font-size: 14px; line-height: 20px;">可尝试取消订单后重新在公众号获取口令下单或联系客服查看问题
                                            <span style="color: #ff6633;">(订单有使用红包可能导致获取返现失败)</span></div>
                                        <div class="table user-opt" data-id="{{id}}" style="margin: 10px;">
                                            <a href="javascript:;"
                                               class="br3 bgf btn-mini btn-mini_outlined qrcode">联系客服</a>&nbsp;&nbsp;
                                            <a href="javascript:;" opt="delete" opt-title="删除订单"
                                               opt-desc="确认删除订单？"
                                               class="mr5 br3 btn-mini btn-mini_black bgf">删除订单</a>
                                        </div>
                                    {{^}}
                                        正在获取订单
                                        <div style="color: #FC6D84; text-align: center; line-height: 30px; font-size: 12px;">
                                            数据有三至五分钟延时，如果数据没有显示，请过几分钟再查询
                                        </div>
                                    {{/time_over}}
                                </div>
                                <div class="table">
                                    <dd class="table-cell vm p10">
                                        <p class="col6">{{taobaoTradeParentId}}</p>
                                    </dd>
                                    <dd class="table-cell vm p10">
                                        <p class="col6">{{format_datetime created_at}} 创建</p>
                                    </dd>
                                </div>
                            </li>
                        {{/if}}
                    {{/each}}
                {{/if_eq}}
            </ul>

            <div class="loadmore-wrapper loadmore" style="margin: 10px;">
                {{#if loadmore}}
                    <div class="weui-infinite-scroll">
                        <div class="infinite-preloader"></div>
                        正在加载...
                    </div>
                {{/if}}
            </div>
        {{^}}
            <div class="tc nothing">
                <span class="mt10 fs14 col9">晳时还没有订单！<br>如有订单请提交订单号至公众号返现</span>
            </div>
        {{/if}}
    </div>
</section>
<div class="code_fixed">
    <div class="item-bg"></div>
    <div class="item-con">
        <span>
            <img src="{{or partner.banner 'http://a5.xcworld.cn/gusonyang_qrcode.png'}}" alt="" class="imgm">
        </span>
        <div class="mt10 tc fs15 colf">长按图片或微信扫一扫添加好友</div>
    </div>
</div>